import request from '@/utils/request'

export default {

    // 讲师列表（条件查询分页）
    getTeacherListPage(current, limit, teacherQuery) {
        return request({
            url: `/eduservice/teacher/findByPage/${current}/${limit}`,
            method: 'post',
            data: teacherQuery
        })
    },

    // 讲师列表
    queryTeacherList() {
        return request({
            url: `/eduservice/teacher/findAll`,
            method: 'get'
        })
    },

    // 根据id删除讲师
    deleteByIdTeacher(id) {
        return request({
            url: `/eduservice/teacher/removeById/${id}`,
            method: 'delete'
        })
    },

    // 添加讲师
    queryTeacher(teacher) {
        return request({
            url: `/eduservice/teacher/saveTeacher`,
            method: 'post',
            data: teacher
        })
    },

    // 根据id查询讲师
    queryTeacherById(id) {
        return request({
            url: `/eduservice/teacher/findByTeacherId/${id}`,
            method: 'get',
        })
    },

    // 根据id修改讲师
    updateTeacherById(teacher) {
        return request({
            url: `/eduservice/teacher/updateByTeacherId/${teacher.id}`,
            method: 'put',
            data: teacher
        })
    }


}